package com.kingyun.gpsinspection.purificationservice.dao.mapper.som;


import com.kingyun.gpsinspection.purificationservice.facade.model.som.Admittance;
import com.kingyun.gpsinspection.purificationservice.facade.model.som.AdmittanceOrg;
import com.kingyun.gpsinspection.purificationservice.facade.model.som.StationIn;

import java.util.List;
import java.util.Map;

/**
 * 准入信息mapper
 */
public interface AdmittanceMapper {

    int insert(Admittance record);

    int insertByStation(StationIn stationIn);

    Admittance queryAdmittance(StationIn stationIn);

    int queryRestStatin(String stationInId);

    int updateStatus(StationIn stationIn);

    List<Admittance> queryList(Admittance admittance);

    int queryCount(Admittance admittance);

    /**
     * 状态删除
     * @param admittance
     * @return
     */
    int updateDelStatus(Admittance admittance);

    /**
     * 修改准入信息
     * @param admittance
     * @return
     */
    int updateAdmittance(Admittance admittance);

    /**
     * 准入组织
     * @param admittanceOrgs
     * @return
     */
    int insertOrgIn(List<AdmittanceOrg> admittanceOrgs);

    /**
     * 根据主键查询准入信息
     * @return
     */
    Admittance queryById(String admittanceId);

    /**
     * 根据验证码查询正在使用的准入信息
     * @param authCode
     * @return
     */
    List<Admittance> queryByAuthCode(String authCode);

    /**
     * 更新准入信息验证码
     * @param map
     * @return
     */
    int updateAuthCode(Map map);

    /**
     * 更新准入信息状态
     * @param map
     * @return
     */
    int updateStatusById(Map map);

}